package com.example.aitoedu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.aitoedu.entity.Stestbank;
import com.example.aitoedu.vo.ChapterVO;
import com.example.aitoedu.vo.QuestionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 曹正豪
* @description 针对表【STestBank(学生作业)】的数据库操作Mapper
* @createDate 2024-10-15 11:12:09
* @Entity com.example.aitoedu.entity.Stestbank
*/
public interface StestbankMapper extends BaseMapper<Stestbank> {

    int score(@Param("sid") Long sid, @Param("chapterId") Long chapterId);

    List<QuestionVO> getAllQuestion(@Param("sid") Long sid, @Param("chapterId") Long chapterId);

    void homework(@Param("s") Stestbank stestbank, @Param("sid") Long sid, @Param("cid") Long cid, @Param("questionIds") List<Long> questionIds);

    QuestionVO submitSelect(Long id);

    List<ChapterVO> myQuestion(@Param("sid") Long sid, @Param("courseId") Long courseId);

}




